#include <iostream>
#include <algorithm>

using namespace std;

bool func(int n)
{
    return n > 5;
}

int main()
{
    int a[10] = {1, 2, 3, 4, 5, 5, 5, 8, 9, 10};
    int b[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};

    cout << count(a, a + 10, 5) << endl;
    cout << count(b, b + 10, 5) << endl;

    cout << count_if(a, a + 10, func) << endl;
    cout << count_if(b, b + 10, func) << endl;
}